find the greatest common factor